package ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.authorizeRFCPanel.authorizeRFCPanelSubs.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.authorizeRFCPanel.authorizeRFCPanelSubs.AuthoriseRFCDialog;
import ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.authorizeRFCPanel.authorizeRFCPanelSubs.CreateWorkOrderDialog;

public class AuthoriseButtonListener implements ActionListener {

	private AuthoriseRFCDialog authoriseRFCDialog;

	public AuthoriseButtonListener(AuthoriseRFCDialog authoriseRFCDialog) {
		this.authoriseRFCDialog = authoriseRFCDialog;
	}

	@Override
	public void actionPerformed(ActionEvent e) {

		this.authoriseRFCDialog.dispose();
		new CreateWorkOrderDialog(authoriseRFCDialog.getAuthorizeRFCPanel()
				.getMainframe(),authoriseRFCDialog.getAuthorizeRFCPanel(), authoriseRFCDialog.getRfc());
	}

}
